package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 团队数据中心实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "tenant_region", 
       uniqueConstraints = @UniqueConstraint(columnNames = {"tenant_id", "region_name"}))
public class TeamRegion extends BaseEntity {
    
    @Column(name = "tenant_id", length = 32, nullable = false)
    private String tenantId;
    
    @Column(name = "region_name", length = 64, nullable = false)
    private String regionName;
    
    @Column(name = "region_alias", length = 64)
    private String regionAlias;
    
    @Column(name = "region_desc", length = 200)
    private String regionDesc;
    
    @Column(name = "is_active", nullable = false)
    private Boolean isActive = true;
    
    @Column(name = "is_public", nullable = false)
    private Boolean isPublic = false;
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId;
    
    @Column(name = "region_url", length = 256)
    private String regionUrl;
    
    @Column(name = "region_token", length = 512)
    private String regionToken;
    
    @Override
    public String toString() {
        return this.regionName;
    }
}





